package com.weitu.workflow.flowBusiness.mapper;

import com.weitu.workflow.flowBusiness.entity.FlowBusiness;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/***
 * 流程业务实体标识维护Mapper
 */
public interface FlowBusinessMapper {
    /***
     * 根据流程业务数量
     * @param paramMap
     * @return
     */
    public int queryFlowBusinessCount(Map<String, Object> paramMap);
    /***
     * 根据流程业务数据列表
     * @param paramMap
     * @return
     */
    public List<FlowBusiness> queryFlowBusinessList(Map<String, Object> paramMap);

    /***
     * 根据业务标识查询流程业务信息
     * @param identity
     * @return
     */
    public FlowBusiness queryFlowBusinessByIdentity(String identity);

    /***
     * 添加流程业务信息
     * @param paramMap
     * @return
     */
    public boolean addFlowBusiness(Map<String, Object> paramMap);

    /***
     * 查询流程业务标识集合
     * @return
     */
    public List<FlowBusiness> queryFlowBusinessIdentityList();
    /**
     * 根据流程id删除业务关联
     * @param processId
     * @return
     */
    public boolean deleteBusinessIdentityAndProcessId(String processId);
    /**
     * 保存业务标识以及对应的工作流
     * @param map
     * @return
     */
    public int addBusinessIdentityAndProcessId(Map<String,Object> map);

    /**
     * 查询全部流程业务标识集合
     * @return
     */
    public List<FlowBusiness> queryFlowBusinessIdentityListNotWorkFlow();
    /**
     * 查询流程业务标识集合（没有关联工作流）
     * @return
     */
    public List<FlowBusiness> queryFlowBusinessIdentityListNotWorkFlow(@Param("processId") String processId);

    /**
     * 根据流程标识查询业务标识
     * @return
     */
    public List<FlowBusiness> queryFlowBusinessIdentityByProcessId(String  processId);

    /**
     * 查询该业务标识是否加入工作流
     * @param map
     * @return
     */
    public int queryFlowBusinessIsInWorkFlow(Map<String,Object> map);

    /**
     * 更新流程业务信息
     * @param map
     * @return
     */
    public int updateFlowBusiness(Map<String,Object> map);

    /**
     * 删除流程业务信息
     * @param map
     * @return
     */
    public int deleteFlowBusiness(Map<String,Object> map);

}

